<template>
    <div>
        <div class="crumbs">
            <el-breadcrumb separator="/">
                <el-breadcrumb-item>
                    <i class="el-icon-tickets"></i> 员工详情
                </el-breadcrumb-item>
            </el-breadcrumb>
        </div>
        <div class="container">
            <div class="handle-box">
                <div class="frm">
                    <el-form ref="form" v-model="empData" label-width="80px" class="demo-form-inline">

                        <div class="block">
                            <span class="demonstration">默认</span>
                            <el-image :src="src"></el-image>
                        </div>

                        <el-form-item label="员工名称:">
                            <el-input v-model="empData.name" class="handle-input mr10"></el-input>
                        </el-form-item>
                    </el-form>
                </div>

            </div>
        </div>
    </div>
</template>

<script>
    import {empListById} from '../../api/emp';

    export default {
        name: "ParticularsEmp",
        data() {
            return {
                // empId: 0,
                empData: [],
                // src: require('../../assets/img/1.jpg'),
                // sr: 'src/assets/img/1.jpg'
            }
        },
        methods: {
            getEmpData() {
                const empId = this.$route.params.empId;
                empListById(empId).then(resp => {
                    // console.log(resp.data)
                    this.empData = resp.data;
                })
            }
        },
        created() {
            this.getEmpData();
        },
        mounted() {
        }
    }
</script>

<style scoped>
    .handle-box {
        margin-bottom: 20px;
    }

    .handle-select {
        width: 120px;
    }

    .handle-input {
        width: 300px;
        display: inline-block;
    }

    .mr10 {
        margin-right: 10px;
        width: 140px;
    }

    .frm {
        /*margin: 0 auto;*/
        padding-left: 40%;
    }
</style>